<@_placeMetadata path=path><#assign a=object/></@_placeMetadata>
<@_placeList path=path advanced=true status=status userId=userId startPublishDate=startPublishDate endPublishDate=endPublishDate
    orderField=orderField orderType=orderType pageIndex=pageNum count=numPerPage>
<div class="pageHeader">
    <form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/paramters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>有效数据条数:</label><label>${(a.size)!} ${(a.allowContribute?then('[允许投稿]',''))!}</label>
                </li>
                <li class="width:auto">
                    <#list 0..1 as s>
                        <label style="width:auto">
                            <input <@t.compare status!'' s?string 'checked="checked"'/> name="status" value="${s}" type="checkbox"/>
                            <span><@t.m 'status.place.data.'+s/></span>
                        </label>
                    </#list>
                </li>
                <li>
                    <label>发布用户:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label>发布日期:</label>
                    <input type="text" name="startPublishDate" class="date" size="10" dateFmt="yyyy-MM-dd" value="${startPublishDate!}" />
                    <span>-</span>
                    <input type="text" name="endPublishDate" class="date" size="10" dateFmt="yyyy-MM-dd" value="${endPublishDate!}" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive">搜索</button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="cmsPlace/add.html?path=${(path?url)!}" target="navTab" rel="cmsPlace/add"><i class="icon-plus-sign-alt icon-large"></i> 添加推荐位数据</a></li>
            <li><a href="cmsPlace/add.html?id={sid}" target="navTab" rel="cmsPlace/edit"><i class="icon-edit icon-large"></i> 修改推荐位数据</a></li>
            <li><a href="cmsPlace/refresh.do" title="确定要刷新这些记录么?" target="selectedTodo" rel="ids"><i class="icon-refresh icon-large"></i> 批量刷新</a></li>
            <li><a href="cmsPlace/check.do" title="确定要审核这些记录么?" target="selectedTodo" rel="ids"><i class="icon-check icon-large"></i> 批量审核</a></li>
            <#if site.useSsi>
                <li class="line">line</li>
                <li><a href="cmsTemplate/publishPlace.do?path=${(path?url)!}" target="ajaxTodo"><i class="icon-file-text-alt icon-large"></i> 发布</a></li>
            </#if>
            <li class="line">line</li>
            <li><a href="cmsPlace/delete.do" title="确定要删除这些记录么?" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i> 批量删除</a></li>
            <li class="line">line</li>
            <li><a href="cmsPlace/clear.do?path=${(path?url)!}" title="确定要清空这些记录么?" target="ajaxTodo"><i class="icon-wrench icon-large"></i> 全部清空</a></li>
        </ul>
    </div>
    <table class="list" width="100%" layoutH="99">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="30">ID</th>
                <th>标题</th>
                <th width="140" orderField="publishDate" class="<#if orderField??&&'publishDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">发布日期</th>
                <th width="140" orderField="createDate" class="<#if orderField??&&'createDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">创建日期</th>
                <th width="100">发布用户</th>
                <th width="80" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">点击数</th>
                <th width="50">状态</th>
                <th width="100">操作</th>
            </tr>
        </thead>
        <tbody>
    <#list page.list as a>
        <@t.merge 'userIds' a.userId!/>
    </#list>

    <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
    <#list page.list as a>
            <tr target="sid" rel="${a.id}">
                <td><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>${a.id}</td>
                <td><#if a.url?has_content><a href="cmsPlace/view.html?id=${a.id}" target="dialog" rel="viewContent${a.id}">${a.title}</a><#else>${a.title}</#if></td>
                <td>${a.publishDate}</td>
                <td>${a.createDate}</td>
                <td>${(userMap[a.userId?string].nickName)!}</td>
                <td>${a.clicks}</td>
                <td><@t.m 'status.place.data.'+a.status/></td>
                <td>
                    <a href="cmsPlace/add.html?id=${a.id}" target="navTab" rel="cmsPlace/edit" title="修改推荐位数据">修改</a>
                    <#if 0=a.status>
                        <a href="cmsPlace/check.do?ids=${a.id}" title="确定要审核这条记录么?" target="ajaxTodo">审核</a>
                    </#if>
                    <a href="cmsPlace/delete.do?ids=${a.id}" title="确定要删除这条记录么?" target="ajaxTodo">删除</a>
                </td>
            </tr>
    </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_placeList>